package cn.tedu.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController//想被浏览器访问
@RequestMapping("/car")//按照指定的访问地址,来匹配这个类
public class Car2Controller {
    //1,,,,当访问了/car/get2时能够,成功的执行get(),,,HandlerMapping找到的映射关系
    //HandlerMapping -- [/car/get2,/car/save.....]
    //测试:http://localhost:8080/car/get2
    @RequestMapping("/get2")
    public String get(){
        return "123"; //给浏览器返回结果
    }
    @RequestMapping("/save")
    //测试:http://localhost:8080/car/save
    public void save(){
        System.out.println(123);
    }
}